package com.lms.dao;

import com.lms.bean.User;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface UserDao extends JpaRepository<User, Long>, JpaSpecificationExecutor<User> {

    @Query("select u from User u")
    List<User> getList(Pageable pageable);

    User findByUsernameAndPassword(String username, String password);
}